<?php
/**
 * Block Profile & Authorization
 * 
 * @author Xavier VILAIN
 * @package Hive\User
 * @license #hive#
 * 
 */
use Fox\Generator;
use Fox\Html\DropList;
use Fox\Html\Block;
$block =  new Block('bProfile',Msg(Hive::BUNDLE,Hive::MENU_USER_AUTHORIZATIONS));
$profiles = Xview::instance()->application()->profiles();
// Profile
$block->add(new DropList(array('pronm','proid'),true,false,true))
		->options($profiles,'proid',Generator::call('name'));
// Groups
$groups = Fox\Dao::finder(Hive\Ressource\Group::className())->find();
if(count($groups) > 0) {
	
	$block->add(new DropList(array('contact_group','grouping'),false,false,false))
				->multiple(true)
				->options($groups,'grouping','name');
} 
return $block;